class AddPostsCountToBlogSort < ActiveRecord::Migration
  def change
    add_column :blog_sorts, :posts_count, :integer, default: 0        #如果在belongs_to模型中启用了counter_cache特性
  end
end
